package com.shiguiwu.springmybatis.spring.lifecycle.init;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.Iterator;

/**
 * @description: 9.2初始化前
 * @author: stone
 * @date: Created by 2021/3/28 12:04
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.spring.lifecycle.init
 */
public class BeforeInitTests {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext factory = new AnnotationConfigApplicationContext();
//        BeanDefinition beanDefinition = BeanDefinitionBuilder.genericBeanDefinition(BeforeBean.class).getBeanDefinition();
//        factory.("beforeBean", beanDefinition);
        factory.register(BeforeBean.class);
        factory.refresh();
        System.out.println(factory.getBean(BeforeBean.class));
    }



}
